<?php get_header();?>
<?php $article = cs_get_option('article');?>
<?php
if (have_posts()) :
    query_posts(array(
                'p'  => $article,
                'showposts'=> 1           
                )); 
    while (have_posts()) : the_post();
      /* 定义meta分区*/
     $meta_data = get_post_meta( get_the_ID(), 'article_options', true );
     /* meta数据获取*/
     $image_header = $meta_data['image_header'];
     $author_img = $meta_data['author_img'];
     $subtitle = $meta_data['subtitle'];
     $author_name = $meta_data['author_name'];

     /* meta图片url获取*/
     $image_header_url = wp_get_attachment_image_src( $image_header, 'full' );
     $author_img_url = wp_get_attachment_image_src( $author_img, 'full' );
 ?>
<a href="<?php the_permalink();?>" class="latestone open-single-frame">
    <img class="holder" src="<?php bloginfo('template_url');?>/images/holder-192x58.png">
   
    <div class="tablelike">
        <div class="bg blur" style="background-image:url(<?php echo  $image_header_url[0] ?>)">
            <div class="hover"></div>
        </div>
         
        <div class="title-info">
        
            <div class="wrap">
                <h1 class="title"><span class="entry-title-primary"><?php the_title()?></span>
                    <span class="entry-subtitle"><?php echo $subtitle ;?></span></h1>
                <div class="top-author">
                    <div class="avatar-wrap">
                        <img src="" data-lazy-original="<?php echo  $author_img_url[0] ; ?>" width="40" height="40" alt="" class="avatar avatar-40 wp-user-avatar wp-user-avatar-40 photo avatar-default" />
                        <noscript> <img src="<?php echo  $author_img_url[0] ; ?>" width="40" height="40" alt="" class="avatar avatar-40 wp-user-avatar wp-user-avatar-40 photo avatar-default" /></noscript>                        </div>
                    <div class="author-name"><?php echo  $author_name ; ?></div>

                    <div class="post-date"></div>
                </div>
                <div class="post-cate"><span class="cate-vd"  title="<?php single_cat_title(); ?>"><?php single_cat_title(); ?></span></div>
            </div>
            
        </div>
        
    </div>
    
</a>
     <?php endwhile; ?>
        <?php endif; wp_reset_query(); ?>

<div class="post-area-frame main-wrap">
    <div id="post-area">
        <!-- post start-->

        <?php if (have_posts()) : ?>
        <?php while (have_posts()) : the_post();

                /* 定义meta分区*/
                $meta_data = get_post_meta( get_the_ID(), 'article_options', true );
                /* meta数据获取*/
                $image_header = $meta_data['image_header'];
                $author_img = $meta_data['author_img'];
                $subtitle = $meta_data['subtitle'];
                $author_name = $meta_data['author_name'];
                $list_img = $meta_data['list_img'];

                /* meta图片url获取*/
                $author_img_url = wp_get_attachment_image_src( $author_img, 'full' );
                $image_header_url = wp_get_attachment_image_src( $image_header, 'full' );
                $list_img_url = wp_get_attachment_image_src( $list_img, 'full' );

                ?>

        <div class="masonry-post">
            <div id="post-23900" class="post-23900 post type-post status-publish format-standard has-post-thumbnail hentry category-vd tag-qq tag-pinpaishipin tag-460">
                <div class="isux-image">
                    <a  class="open-single-frame" href="<?php the_permalink();?>">
                <img width="600" height="300" src="<?php echo  $list_img_url[0] ?>" class="attachment-box-image size-box-image wp-post-image" alt="<?php the_title();?>" /></a>
                </div>
                <h2><a class="open-single-frame" href="<?php the_permalink();?>"><span class="entry-title-primary"><?php the_title()?></span> <span class="entry-subtitle"><?php echo  $subtitle ; ?></span></a></h2>
                <div class="info">
                    <div class="author">
                        <img src="" data-lazy-original="<?php echo  $author_img_url[0] ; ?>" width="40" height="40" alt="" class="avatar avatar-40 wp-user-avatar wp-user-avatar-40 photo avatar-default" />
                        <noscript><img src="<?php echo  $author_img_url[0] ; ?>" width="40" height="40" alt="" class="avatar avatar-40 wp-user-avatar wp-user-avatar-40 photo avatar-default" /></noscript>
                    <span class="username"><?php echo  $author_name ; ?></span>
                    </div>
                    <div class="isux-date">
                        <?php the_time('Y-m-d');?>
                    </div>

                </div>

                <div class="isux-category">
                    <span class="cate-vd"  title="<?php single_cat_title(); ?>"><?php single_cat_title(); ?></span>            </div>
            </div>
        </div>
        <!-- post end-->

            <?php endwhile; ?>
        <?php endif; wp_reset_query(); ?>


    </div></div>

<div id="loadmore" class="loadmore">
    <?php bxp_pagenavi();?>
    
</div>
<div id="juhua-loading"><img alt="Loading..." src="<?php bloginfo('template_url')?>/picture/20130704115053640.gif"><span> </span></div>

<input type="hidden" id="isHomePage" value="1">

<?php get_footer();?>
